package langnstats.project.languagemodel.loglinear;

import langnstats.project.lib.WordType;

public class ExistVerb extends LLFeature{
	
	private static final long serialVersionUID = 43L; 
	
	private int history=0;
	private String verb="no";
	
	public String getFeature(WordType token){
		String feature="";
		
		feature=verb;

		history++;
		
		if(token.getName().equals(WordType.VB.getName()) ||
				token.getName().equals(WordType.VBD.getName()) ||
				token.getName().equals(WordType.VBP.getName()) ||
				token.getName().equals(WordType.VBZ.getName())){
			verb="yes";
		}
		
		if(token.getName().equals(WordType.PERIOD.getName())){
			rewind();
		}
		
		return "verb="+feature;
	}
	
	public void rewind(){
		history=0;
		verb="no";
	}
}
